<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{padding:0; margin:0;}
        .box1{width:1000px; height:300px; background:red; 
        float:left; margin-bottom: 50px;}
        .box2{
            width:1000px; height:300px; background:yellow;
            /* margin-left: 100px; */
            float:left;
            margin-top:100px;
        }

        /* 

        注意
            margin上下重叠，取大值,如果有浮动，上下就变成了相加
            margin左右是相加的
        */
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>
</html>